package cn.tedu.demo05wangaoshong.work;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class ConfigWork {

    @Bean
    public Worker worker() {

        Worker worker = new Worker();
        worker.setAge(25);
        worker.setName("工人");
        return worker;
    }
}
